import axios from 'axios';
export const articleCategoryList = (token) => {
    try {
        // 发送 get 请求到后端注册接口 不需要异步操作async await
        const response = axios.get('/api/category', { headers: { "token": token } });

        // 返回后端的响应数据
        return response;


    } catch (error) {
        // 发生错误时的处理
        console.error('Error during user registration:', error);
        throw new Error('发生错误，请稍后重试');
    }
};